d <- fread('PRS85006172.csv')

d$year <- as.numeric(substr(d$DATE, 1, 4))


png('labor_share2.png',width = 5, height = 3, units="in", res=300, pointsize=8)
par(lwd = 4)
par(mfrow = c(1,1), family="Arial", cex = 1.5)
par(mgp=c(2.2,0.45,0), tcl=-0.4, mar=c(3.3,3.6,1.1,1.1))

d <- d[year >= 2007]

labor_share <- 100*(cumprod(d$PRS85006172/100 + 1))

plot(d$year, 100*(log(labor_share) - log(labor_share[1])), type = 'l',
     xlim = c(2007, 2018), ylim = c(-6, 2), xlab = 'Year', 
     ylab = 'Percent Deviation from 2007')
abline(h=0, lty = 2)
dev.off() 
